import request from '~/utils/resquest'

// 系统通告列表
export const noticeListGet = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/notice/page',
    method: 'get',
    params
  })

// 删除系统通告
export const noticeRemovePost = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/notice/remove',
    method: 'post',
    params
  })

// 用户组织树
export const getDeptUserTreeGet = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/dept/getDeptUserTree',
    method: 'get',
    params
  })

// 系统通告 - 保存
export const noticeAddPost = <T>(data: T) =>
  request({
    url: '/api/gxsaas-system/notice/add',
    method: 'post',
    data
  })

// 系统通告 - 发布
export const noticePushNoticePost = <T>(data: T) =>
  request({
    url: '/api/gxsaas-system/notice/pushNotice',
    method: 'post',
    data
  })

// 系统通告 - 根据ID发布
export const noticePushNoticeByIdPost = <T>(params: T) =>
  request({
    url: '/api/gxsaas-system/notice/pushNoticeById',
    method: 'post',
    params
  })
